// pages/city/goin/goin.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
remake:''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
	  wx.getStorage({
		  key:'uid',
		  success:(e)=>{
			  wx.request({
			  	url:getApp().globalData.http+'action=shopServerDetail&sid='+options.id+
				'&uid='+e.data.uid+'&Longitude='+options.lon+'&Latitude='+options.lat,
			  	success:(res)=>{
			  		console.log(res)
					this.setData({
						data:res.data.data,
						uid:e.data.uid
					})
			  	}
			  })
		  }
	  })
  },
  mobile(e){
	  wx.makePhoneCall({
		  phoneNumber:e.currentTarget.dataset.num
	  })
  },
  remake(e){
	  this.setData({
		  remake:e.detail.value
	  })
  },
  sure(e){
	  wx.request({
		  url:getApp().globalData.http+'action=buyShopServer&uid='+this.data.uid+'&sid='+this.data.data.sid+
		  '&shopid='+this.data.data.ShopID+'&remark='+this.data.remake,
		  success:(e)=>{
			  console.log(e)
			  wx.navigateTo({
			  		  url:'../../Vip/deal/deal?orderCode='+e.data.data.orderCode+'&totalprice='+e.data.data.totalprice
			  })
		  }
	  })
	  
  }
})